import request from "@/utils/request"

export const queryAllApi = () => request.get(`/depts`)
export const addDeptApi = (data) => request.post('/depts', data)

export const queryById = (id) => {
  return request.get(`/depts/${id}`)
}

export const updateById = (data) => {
  return request.put(`/depts`, data)
}

export const delById=(id)=>{
  return request.delete(`/depts?id=${id}`)
}